import dict from '@/const/dict/dict';

export default {
  height:'auto',
  calcHeight: 30,
  tip: false,
  searchShow: true,
  border: true,
  index: true,
  viewBtn: false,
  selection: true,
  dialogClickModal: false,
  grid: false,
  gridBtn: false,
  dialogDrag: true,
  defaultSort: {
    prop: 'createTime',
    order: 'descending'
  },
  column: [
    {
      label: "主键",
      prop: "id",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "国旗",
      prop: "flagUrl",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
    },
    {
      label: "国家名称",
      prop: "name",
      display: false,
      children: [
        {
          label: "英文",
          prop: "nameEn",
          type: "input",
          prepend: "国家名称",
          search: true,
          searchSpan: 6,
          span: 24,
          rules: [{
            required: true,
            message: "请输入国家名称-英文",
            trigger: "blur"
          }],
        },
        {
          label: "中文",
          prop: "nameCn",
          type: "input",
          prepend: "国家名称",
          search: true,
          searchSpan: 6,
          searchLabelWidth: 75,
          span: 24,
          rules: [{
            required: true,
            message: "请输入国家名称-中文",
            trigger: "blur"
          }],
        },
      ]
    },
    {
      label: "国家代码",
      prop: "code",
      type: "input",
      search: true,
      searchSpan: 4,
      searchLabelWidth: 100,
      rules: [{
        required: true,
        message: "请输入国家代码",
        trigger: "blur"
      }],
    },
    {
      label: "号码区号",
      prop: "areaCode",
      type: "input",
      search: true,
      searchSpan: 4,
      searchLabelWidth: 100,
      rules: [{
        required: true,
        message: "请输入国际电话区号",
        trigger: "blur"
      }],
    },
    {
      label: "状态",
      prop: "status",
      type: "switch",
      dicData: dict.enable_disable,
      dataType: "number",
      value: 1,
      search: true,
      searchSpan: 4,
      searchLabelWidth: 75,
      rules: [{
        required: true,
        message: "请输入状态",
        trigger: "blur"
      }],
    },
  ]
}
